package com.example.demo.service;

import com.example.demo.exception.CommonException;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author Jerry.Zeng
 * @version v1.0.0
 * @date 2021/10/21 14:21
 */
@Service
public class MyService {

    @Async("asyncServiceExecutor2")
    public void get(){
        String name = Thread.currentThread().getName();
        System.out.println(name+"执行service");
//        int i = 1 / 0;
        throw new CommonException("自定义异常");
    }

}
